#   SCE CONFIDENTIAL
#   PLAYSTATION(R)3 Programmer Tool Runtime Library 192.001
#   Copyright (C) 2006 Sony Computer Entertainment Inc.
#   All Rights Reserved.
#


#----------------------------------------------------------------------
# PPU PRX targets
#----------------------------------------------------------------------
ifneq ($(PPU_PRX_TARGET),)
PPU_SPRX_TARGET     = $(basename $(PPU_PRX_TARGET))$(SPRX_SUFFIX)
endif

PPU_PRX_CLEAN_OBJS  = $(strip $(PPU_PRX_TARGET) $(PPU_SPRX_TARGET))

TARGET              +=  $(PPU_PRX_TARGET) $(PPU_SPRX_TARGET)

#----------------------------------------------------------------------
# Build rules for PRX
#----------------------------------------------------------------------
$(PPU_PRX_TARGET): $(PPU_DEPENDS) $(PPU_OBJS_DEPENDS) $(PPU_LIBS)
	@mkdir -p $(dir $(@))
	$(PPU_PRX_CXXLD) $(PPU_OBJS) $(PPU_PRX_LDFLAGS) $(PPU_LIBS) -o $@

$(PPU_SPRX_TARGET): $(PPU_PRX_TARGET)
	@mkdir -p $(dir $(@))
ifneq ($(MAKE_FSELF_TYPE),)
	$(MAKE_FSELF) -input $< -output $@ $(MAKE_FSELF_TYPE)
else
	$(MAKE_FSELF) $< $@
endif

.PHONY: ppu-prx-clean

ppu-prx-clean:
ifneq ($(PPU_PRX_CLEAN_OBJS),)
	$(RM) $(PPU_PRX_CLEAN_OBJS)
endif


